﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Iguana.Core.HypterText;

namespace Iguana.Functionality.Tests
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
           
            // Create a new instance of the HTML tag.
            Iguana.Core.HypterText.DocumentStructuralElements.HTML m_Html = new Core.HypterText.DocumentStructuralElements.HTML();

            m_Html.Attributes["xmlns"] = "http://www.w3.org/1999/xhtml"; // This is acceptable because that URI is included in the acceptable values.

            m_Html.Attributes["lang"] = "en";
            m_Html.Attributes["xml:lang"] = "en";
            m_Html.Attributes["dir"] = "ltr"; // Acceptable values are ltr or rtl
            
            this.textBox1.Text = m_Html.ToString();

            // Create a new title tag.
            Iguana.Core.HypterText.StandardElements.Title m_Title = new Core.HypterText.StandardElements.Title();
            m_Title.Attributes["dir"] = "rtl"; // Just to prove title also allows changing.
            m_Title.Content = "Untitled";
            this.textBox2.Text = m_Title.ToString();
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("http://iguana.codeplex.com/");
        }
    }
}
